@@ -51,8 +51,8 @@ module Agents |
||
51 | 51 |
end |
52 | 52 |
|
53 | 53 |
def validate_options |
54 |
- unless options['token'].present? && options['user'].present? && options['message'].present? && options['expected_receive_period_in_days'].present? |
|
55 |
- errors.add(:base, 'token, user, message, and expected_receive_period_in_days are all required.') |
|
54 |
+ unless options['token'].present? && options['user'].present? && options['expected_receive_period_in_days'].present? |
|
55 |
+ errors.add(:base, 'token, user, and expected_receive_period_in_days are all required.') |
|
56 | 56 |
end |
57 | 57 |
end |
58 | 58 |
|
@@ -179,11 +179,6 @@ describe Agents::PushoverAgent do |
||
179 | 179 |
@checker.should_not be_valid |
180 | 180 |
end |
181 | 181 |
|
182 |
- it "should validate presence of message" do |
|
183 |
- @checker.options[:message] = "" |
|
184 |
- @checker.should_not be_valid |
|
185 |
- end |
|
186 |
- |
|
187 | 182 |
it "should validate presence of expected_receive_period_in_days" do |
188 | 183 |
@checker.options[:expected_receive_period_in_days] = "" |
189 | 184 |
@checker.should_not be_valid |